package com.sudo.common.component;

import com.sudo.common.ip2region.Ip2RegionByIndex;
import com.sudo.common.ip2region.Ip2RegionStrategy;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @Author：DayDayUp
 * @Create：2023/2/6 9:27
 */
@Data
@ConfigurationProperties(prefix = Ip2RegionProperties.PREFIX)
public class Ip2RegionProperties {

    public static final String PREFIX = "ip2region";

    /**
     * 是否开启自动配置
     */
    private boolean enabled = false;

    /**
     * db数据文件位置
     * <p>
     * ClassPath目录下
     * </p>
     */
    private String dbFile = "classpath:data/ip2region.xdb";

    private Class<? extends Ip2RegionStrategy> strategy = Ip2RegionByIndex.class;
}
